This repository has been archived by the owner on Apr 21, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
$key
argument, as it can simply be built from the label, which makes it easier. I then added in the support for aroot
, so we can use theWP_CONTENT_DIR
,WP_PLUGIN_DIR
,WPMU_PLUGIN_DIR
and the root as containers for additional plugin directories. It now also works (and this was the main reason for this), if you defined an external location for your plugins. I got several local installations, that all together share the local domainplugins.dev
for their plugins. This saves me from copy/pasting and updating plugins in several installations and makes development much easier. Moving the arguments to an array will make altering the API arguments much easier later on. I took some time to make shure, that we'll guide people on how to use the new API without breaking existing installations, so everything's backwards compatible. The last thing that was added, is guidance on when to hook the plugin. It's a simply call to_doing_it_wrong()
if thecurrent_filter()
isn'tplugins_loaded
. This prevents the usage of themuplugins_loaded
hook, but it isn't a loss, as the filter wouldn't help anything, as the plugin runs later.Everything's tested in different cases, but you know what: We're all humans and bugs are built in :)